package com.itheima.cas;

import java.time.temporal.Temporal;

public class Ticket implements Runnable {
    private  int ticket=100;
    @Override
    public void run() {
        while (true) {
            if(ticket==0){
                break;
            }else{
                ticket--;
                System.out.println(Thread.currentThread().getName()+"剩下"+ticket+"张票了");
            }
        }
    }
}
